<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="s" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <link type="text/css" rel="stylesheet" href="<s:url value="/cargodecl/css/jquery.css"/>"/>
    <script type="text/javascript" src="<s:url value="/cargodecl/js/util.js?version=112"/>"
            charset="UTF-8"></script>
    <script type="text/javascript" src="<s:url value="/cargodecl/js/jquery/jquery.js"/>"
            charset="UTF-8"></script>
    <script type="text/javascript" src="<s:url value="/js/business/hgdata.js"/>"
            charset="UTF-8"></script>
    <script type="text/javascript" charset="UTF-8"
            src="<s:url value="/js/laytpl/laytpl.js"/>"></script>
    <script type="text/javascript"
            src="<s:url value="/cargodecl/js/jquery/jquery.validate.js?version=1113213"/>"
            charset="UTF-8"></script>
    <script type="text/javascript"
            src="<s:url value="/cargodecl/js/jquery/jquery.metadata.js?vetrsion=4"/>"
            charset="UTF-8"></script>
    <script type="text/javascript" src="<s:url value="/cargodecl/js/jquery/messages_cn.js"/>"
            charset="UTF-8"></script>
    <script type="text/javascript" src="<s:url value="/cargodecl/datePicker/WdatePicker.js"/>"
            charset="UTF-8"></script>
    <script type="text/javascript" src="<s:url value="/cargodecl/js/plugins/jscolor/jscolor.js"/>"
            charset="UTF-8"></script>
    <script type="text/javascript"
            src="<s:url value="/cargodecl/js/jquery/jquery.loadmask.min.js?version=112"/>"></script>
    <script type="text/javascript"
            src="<s:url value="/cargodecl/js/jquery/ajaxfileupload.js?version=112"/>"></script>
    <link rel="stylesheet" type="text/css"
          href="<s:url value="/cargodecl/css/filestyle.css?v=3"/>"/>
    <link rel="stylesheet" type="text/css"
          href="<s:url value="/cargodecl/css/bootstrap.min.css"/>"/>
    <link rel="stylesheet" type="text/css"
          href="<s:url value="/cargodecl/css/plugins/font-awesome/css/font-awesome.min.css"/>"/>

    <link rel="stylesheet" type="text/css"
          href="<s:url value="/cargodecl/css/jquery.loadmask.css"/>"/>
    <!--[if IE 7]>
    <link rel="stylesheet" href="/cargodecl/css/plugins/font-awesome/css/font-awesome-ie7.min.css"/>
    <![endif]-->
    <link rel="stylesheet" type="text/css"
          href="<s:url value="/cargodecl/css/style.css?VERSION=12211111223"/>"/>
    <link href='<s:url value="/cargodecl/css/easyui.css?va=12"/>' rel='stylesheet' type='text/css'/>
    <link href='<s:url value="/cargodecl/css/themes/metro/easyui.css"/>' rel='stylesheet'
          type='text/css'/>
    <link href='<s:url value="/cargodecl/css/themes/icon.css"/>' rel='stylesheet' type='text/css'/>

    <script src='<s:url value="/cargodecl/js/easyui/jquery.easyui.min.js?version=123112s1"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/easyui/easyui-lang-zh_CN.js"/>'
            type='text/javascript'></script>

    <script src='<s:url value="/cargodecl/js/common_select_v2.js?vsd=12"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/hgGood.js?vsd=311222211212111211159"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/jyGood.js?vsd=9"/>' type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/jyAndHgCommon.js?vsd=3211111111111111111129"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/jyjyAndHgState.js?vsd=31224"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/tableInput.js?vsd=311111111111114"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/printMenu.js?vsd=312"/>'
            type='text/javascript'></script>
    <script src='<s:url value="/cargodecl/js/jyAndHgLock.js"/>' type='text/javascript'></script>

    <link href='<s:url value="/cargodecl/css/base.css?version=23231"/>' rel='stylesheet'
          type='text/css'/>
    <link href='<s:url value="/cargodecl/css/index/common.css?b=ss1s1s123113"/>' rel='stylesheet'
          type='text/css'/>
    <link href='<s:url value="/cargodecl/css/combobox.css?v=1"/>' rel='stylesheet' type='text/css'/>
    <script src='<s:url value="/cargodecl/js/select_combobox.js?a=9"/>'
            type='text/javascript'></script>

    <link href="<s:url value="/cargodecl/css/exportDeclare.css"/>" rel="stylesheet">
    <script src='<s:url value="/cargodecl/js/exportDeclare_customs/exportDeclare.js"/>'
            type='text/javascript'></script>

    <input id="initjquery" type="hidden" value="0"/>
    <link href="<s:url value="/cargodecl/css/popModal.css"/>" rel="stylesheet">

    <style type="text/css">
        html, body {
            height: 99%;
        }

        font {
            color: #0d79d6;
        }
    </style>
    <title>在线下单-进出口详情页</title>
    <script>
    </script>
</head>
<body style="background: #fff none repeat scroll 0 0;" onunload="doOnUnload(iframeIds)">
<div style="display:none;">
    <div id="errorShowDiv" class="easyui-dialog addInForm"
         style="width: 800px; height: 600px; padding: 10px 20px;" closed="true"
         buttons="#errorShowDiv-buttons">
        <div id="errorShowDivDiv" style="width: 700px; height: 500px;">
            <div style="font-size: 16px">
                <span>操作失败原因:</span><span id="errorMessage"></span> <input type="button"
                                                                           value="显示错误"
                                                                           style="width: 100px"
                                                                           onclick="showErrorDetail()">
            </div>
            <div id="errorDetailDiv" style="display:none;">
                	<span>
                	错误日志:
                	</span>
                <div id="errorDetail">
                </div>
            </div>
        </div>

        <div id="errorShowDiv-buttons">
            <input type="button" style="width: 50px" onclick="javascript:closeErrorShowDiv();"
                   value="关闭"/>
        </div>
    </div>
</div>

<div style="display:none;">

    <div id="noteShowDiv" class="easyui-dialog addInForm"
         style="width: 800px; height: 600px; padding: 10px 20px;" closed="true"
         buttons="#noteShowDiv-buttons">
        <div id="noteShowDivDiv" style="width: 700px; height: 500px;">

        </div>

        <div id="noteShowDiv-buttons" style="border:0px;">
            <input type="button" style="width: 50px;background: #d5361b;"
                   onclick="javascript:closeNoteShowDiv();" value="关闭"/>
        </div>
    </div>
</div>
<!--  ##############出口报关数据录入页面###############  -->
<div class="clean" style="height:5px"></div>
<div class="bao">
    <form id="myForm" name="myForm" action="entryDeclare_save.do" method="post">
        <div class="nr_x">
            <div id="nr_x_b" style="overflow-y: scroll;" class="nr_x_b">
                <%--内容区域--%>
                <div class="nr" style="margin: 10px;">
                    <%--左边区域--%>
                    <div class="nr-left">
                        <table cellspacing="0" cellpadding="0" border="1"
                               style="margin-bottom: 4px; width: 99%;" class="table">
                            <tr>
                                <th style="width: 10%">
                                    <span>海关编号</span>
                                </th>
                                <td style="width:35%;">
                                    <input type="text" id="GJH" name="baHgbaseinfo.gjh"
                                           value="${declaration.sno}" atitle="海关申报-海关编号"/>
                                    <input type="hidden" id="HGVERSION_NO"
                                           name="baHgbaseinfo.version_no"
                                           value="${declaration.bl_no}"/>
                                </td>
                                <th style="width: 10%">
                                    <span>报关行</span>
                                </th>
                                <td style="width: 35%;">
                                    <input id="GJGLMM" type="text" name="baHgbaseinfo.gjglmm"
                                           style="width: 100%;" value="${declaration.company_co}"
                                           atitle="海关申报-报关行"/>
                                </td>
                        </table>
                        <table style="width: 99%;" cellspacing="0" cellpadding="0" border="1"
                               class="table">
                            <tr>
                                <th>
                                    <span>统一编号</span>
                                </th>
                                <td style="width: 30%;" colspan="3">
                                    <input type="text" id="TYBH" name="baHgbaseinfo.tybh"
                                           readonly="readonly" value="${declaration.company_co}"
                                           atitle="海关申报-统一编码"/>
                                </td>
                                <th>
                                    <span>申报状态</span>
                                </th>
                                <td id="hgStateTd" colspan="3" style="width: 30%">
                                    <input id="hgStateInput" readonly="readonly" type="text"
                                           value="${declaration.state}"/>
                                </td>
                                <script>
                                    changeHgStatuName('');
                                </script>
                            </tr>
                            <tr>
                                <th>
                                    <span>海关编号</span>
                                </th>
                                <td style="width: 30%;" colspan="3">
                                    <input type="text" id="HGBH" name="baHgbaseinfo.hgbh"
                                           readonly="readonly" value="${declaration.sno}"
                                           atitle="海关申报-海关编号"/>
                                </td>
                                <th>
                                    <span><span class="mustRemark">*</span>出口口岸</span>
                                </th>
                                <td style="width: 30%;" colspan="3">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.export_port}"
                                           title=""/>
                                    </span>
                                    <input id="HGSB-JKKACKKA" atitle="海关申报-出口口岸（关区代码表）"
                                           name="baHgbaseinfo.jkkackka" valueId="jkkackkaHidden"
                                           selectData="co_hggqdm" theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.export_port}"
                                           style="display: none;"/>
                                    <input type="hidden" id="jkkackkaHidden" name="jkkackkaHidden"
                                           class="{required:true}"
                                           value=""/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <span>备案号</span>
                                </th>
                                <td style="width: 30%;" colspan="2">
                                    <input type="text" name="baHgbaseinfo.bah" atitle="海关申报-备案号"
                                           class="{anLength:[12,12]}"
                                           value="${declaration.record_id}"/>
                                </td>
                                <th style="white-space: nowrap;width:100px;">
                                    <span>合同协议号</span>
                                </th>
                                <td style="width: 30%;" colspan="2">
                                    <input type="text" name="baHgbaseinfo.htxyh"
                                           class="{maxlength:32}" value="${declaration.contract_no}"
                                           atitle="海关申报-合同协议号"/>
                                </td>
                                <th>
                                    <span>签约日期</span>
                                </th>
                                <td style="width: 30%;" colspan="2">
                                    <input type="text" name="baHgbaseinfo.ckrq"
                                           value="${declaration.contract_date}"
                                           atitle="海关申报-签约日期"/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <span><span class="mustRemark">*</span>申报地海关</span>
                                </th>
                                <td style="width: 30%;" colspan="3">
                                    <input value="${declaration.shenbao_company_name}"
                                           title=""/>
                                    </span>
                                    <input value="${declaration.shenbao_company_name}"
                                           style="display: none;"/>
                                    <input type="hidden" id="sbkaHidden" name="sbkaHidden"
                                           class="{required:true}"
                                           value=""/>
                                </td>
                                <th>
                                    <span>出口日期</span>
                                </th>
                                <td style="width: 15%;">
                                    <input type="text" name="baHgbaseinfo.ckrq"
                                           value="${declaration.export_date}"
                                           atitle="海关申报-出口日期"/>
                                </td>
                                <th>
                                    <span>申报日期</span>
                                </th>
                                <td style="width: 15%;">
                                    <input type="text" id="SBRQ" style="width: 100%"
                                           value="${declaration.report_date}"
                                           name="baHgbaseinfo.sbrq" readonly="readonly">
                                </td>
                            </tr>
                            <tr>
                                <th style="width: 10%;">
                                    <span><span class="mustRemark">*</span>收发货人</span>
                                </th>
                                <td style="width: 15%;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value=""
                                           title=""/>
                                    </span>
                                    <input style="display: none;" id="HGSB-JYDWBM" name=""
                                           selectData="hg_option" theKey="HGCODE" keyId="jydwHidden"
                                           notClearIfNotExist="1" theValue="HGNAMECN"
                                           valueId="jydwmc" theCode="CODESCC" codeId="tradeCodeScc"
                                           data-options="valueField:'id', textField:'text'"/>
                                    <input type="hidden" id="jydwHidden" name="baHgbaseinfo.jydwbm"
                                           class="{required:true,length10:true}"
                                           value=""/>
                                </td>
                                <td colspan="2">
                                    <input type="text" id="tradeCodeScc"
                                           name="baHgbaseinfo.tradeCodeScc" class="{maxlength_T:18}"
                                           value=""/>
                                </td>
                                <td style="" colspan="2">
                                    <input type="text" id="jydwmc" name="baHgbaseinfo.jydwmc"
                                           class="{required:true,maxlength_T:70}"
                                           atitle="海关申报-收发货人名称"
                                           value=""/>
                                </td>
                                <th>
                                    <span><span class="mustRemark">*</span>运输方式</span>
                                </th>
                                <td style="" colspan="1">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.transport_mode}"
                                           title="(2)水路运输"/>
                                    </span>
                                    <input id="HGSB-YSFS" atitle="海关申报-运输方式"
                                           name="baHgbaseinfo.ysfs" valueId="ysfsHidden"
                                           selectData="hg_co_ysgj" theKey="SHOWNAME" theValue="ID"
                                           value="3" style="display: none;"/>
                                    <input type="hidden" id="ysfsHidden" name="ysfsHidden"
                                           class="{required:true}"
                                           value="3"/>
                                </td>
                            </tr>
                            <tr>
                                <th style="white-space: nowrap;">
                                    <span><span class="mustRemark">*</span>
                                         <c:if test="${table=='entry'}">
                                             消费使用单位
                                         </c:if>
                                        <c:if test="${table=='export'}">
                                            生产销售单位
                                        </c:if>
                                        </span>
                                </th>
                                <td>
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.fahuo_company_name}"
                                           title=""/>
                                    </span>
                                    <input style="display: none;" id="SHDWBM" name=""
                                           selectData="hg_option" theKey="HGCODE"
                                           keyId="shdwbmfhdwbmHidden" notClearIfNotExist="1"
                                           theValue="HGNAMECN" valueId="shdwmcfhdwmc"
                                           theCode="CODESCC" codeId="ownerCodeScc"
                                           data-options="valueField:'id', textField:'text'"/>
                                    <input type="hidden" id="shdwbmfhdwbmHidden"
                                           name="baHgbaseinfo.shdwbmfhdwbm"
                                           class="{required:true,length10:true}" value=""/>
                                </td>

                                <td colspan="2">
                                    <input type="text" id="ownerCodeScc"
                                           name="baHgbaseinfo.ownerCodeScc" class="{maxlength_T:18}"
                                           value=""/>
                                </td>

                                <td style="width: 25%;" colspan="2">
                                    <input type="text" class="{required:true,maxlength_T:70}"
                                           name="baHgbaseinfo.shdwmcfhdwmc" id="shdwmcfhdwmc"
                                           atitle="海关申报-消费使用单位名称" value=""/>
                                </td>
                                <th style="white-space: nowrap;">
                                    <span><span class="mustRemark">*</span>运输工具名称</span>
                                </th>
                                <td style="" colspan="2">
                                    <input type="text" name="baHgbaseinfo.ysgjmc"
                                           atitle="海关申报-运输工具名称" value="${declaration.transport_na}"
                                           class="{required:true,maxlength_T:26}"/>
                                </td>

                            </tr>
                            <tr>
                                <th>
                                    <span><span class="mustRemark">*</span>申报单位</span>
                                </th>
                                <td style="">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.shenbao_company_co}"
                                           title="${declaration.shenbao_company_co}"/>
                                    </span>
                                    <input style="display: none;" id="SBDWBM" name=""
                                           selectData="hg_option" theKey="HGCODE"
                                           keyId="sbdwbmHidden" notClearIfNotExist="1"
                                           theValue="HGNAMECN" valueId="sbdwmc"
                                           theCode="CODESCC" codeId="agentCodeScc"
                                           data-options="valueField:'id', textField:'text'"/>
                                    <input type="hidden" id="sbdwbmHidden"
                                           name="baHgbaseinfo.sbdwbm"
                                           class="{required:true,length10:true}"
                                           value="${declaration.shenbao_company_co}"/>
                                </td>
                                <td colspan="2">
                                    <input type="text" name="baHgbaseinfo.agentCodeScc"
                                           id="agentCodeScc" class="{maxlength_T:18}"
                                           value=""/>
                                </td>
                                <td style="width: 25%;" colspan="2">
                                    <input type="text" name="baHgbaseinfo.sbdwmc" id="sbdwmc"
                                           class="{required:true,maxlength_T:70}"
                                           atitle="海关申报-申报单位名称"
                                           value="${declaration.shenbao_company_name}"/>
                                </td>

                                <th>
                                    <span>航次号</span>
                                </th>
                                <td style="width: 30%;" colspan="1">
                                    <input type="text" class="{maxlength_T:32}"
                                           name="baHgbaseinfo.hch" value="${declaration.voyage_no}"
                                           atitle="海关申报-航次号"
                                           onchange="changeUpper(this)"/>
                                </td>
                            </tr>

                            <tr>
                                <th>
                                    <span>提运单号</span>
                                </th>
                                <td style="width: 15%;" colspan="3">
                                    <input type="text" class="{maxlength_T:32}"
                                           name="baHgbaseinfo.tydh" value="${declaration.bl_no}"
                                           atitle="海关申报-提运单号"
                                           onchange="changeUpper(this)"/>
                                </td>

                                <th>
                                    <span>许可证号</span>
                                </th>
                                <td style="width: 30%;" colspan="3">
                                    <input name="baHgbaseinfo.xkzh" type="text" atitle="海关申报-许可证号"
                                           value="${declaration.license_no}"
                                           class="{maxlength_T:20}"/>
                                </td>

                                <th style="display: none;">
                                    <span><span class="mustRemark">*</span>结汇方式</span>
                                </th>
                                <td style="width: 15%; display: none;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.lc_type}"
                                           title=""
                                           onfocus="initByFocus($(this));"/>
                                    </span>
                                    <input valueId="jhfsHidden" id="HGSB-JHFS" atitle="海关申报-结汇方式"
                                           name="baHgbaseinfo.jhfs" selectData="co_hgjhfs"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.lc_type}"
                                           style="width: 100%; display: none;"/>
                                    <input type="hidden" id="jhfsHidden" name="jhfsHidden" class=""
                                           value=""/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <span><span class="mustRemark"></span>纳税单位</span>
                                </th>
                                <td>
                                    <input value="${declaration.tex_company}"/>
                                </td>
                                <th>
                                    <span><span class="mustRemark">*</span>监管方式</span>
                                </th>
                                <td style="width: 15%;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.trade_mode}"
                                           title=""/>
                                    </span>
                                    <input valueId="jgfsHidden" id="HGSB-JGFS" atitle="海关申报-监管方式"
                                           name="baHgbaseinfo.jgfs" selectData="co_hgjgfs"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.trade_mode}"
                                           style="display: none;"/>
                                    <input type="hidden" id="jgfsHidden" name="jgfsHidden"
                                           class="{required:true}"
                                           value=""/>
                                </td>
                                <th>
                                    <span><span class="mustRemark">*</span>征免性质</span>
                                </th>
                                <td style="width: 15%;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           value="${declaration.levymode}"/>
                                    </span>
                                    <input valueId="zmxzHidden" id="HGSB-ZMXZ" atitle="海关申报-征免性质"
                                           name="baHgbaseinfo.zmxz" selectData="co_hgzmxz"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.levymode}" style="display: none;"/>
                                    <input type="hidden" id="zmxzHidden" name="zmxzHidden"
                                           class="{required:true}"
                                           value=""/>
                                </td>

                                <th style="width: 10%;">
                                    <span>征税比例</span>
                                </th>
                                <td style="width: 15%;">
                                    <input type="text" name="baHgbaseinfo.zsbl" readonly="readonly"
                                           value="" style="width: 100%;" atitle="海关申报-征税比例"/>
                                </td>
                            </tr>
                            </tr>
                            <th style="white-space: nowrap;">
                                <span><span class="mustRemark">*</span>
                                    <c:if test="${table=='export'}">
                                        运抵国(地区)
                                    </c:if>
                                    <c:if test="${table=='entry'}">
                                        启抵国(地区)
                                    </c:if>
                                </span>
                            </th>
                            <td style="width: 15%;">
                                <input class="textbox-text validatebox-text textbox-prompt"
                                       type="text" placeholder=""
                                       autocomplete="off"
                                       style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                       value="${declaration.arrived_country}"/>
                                </span>
                                <input valueId="ydgHidden" id="HGSB-YDG" atitle="海关申报-运抵国(地区)"
                                       name="baHgbaseinfo.ydg" selectData="hg_co_gjdm"
                                       theKey="SHOWNAME" theValue="ID"
                                       value="${declaration.arrived_country}"
                                       style="display: none;"/>
                                <input type="hidden" id="ydgHidden" name="ydgHidden"
                                       class="{required:true}" value=""/>
                            </td>
                            <th style="white-space: nowrap;">
                                <span><span class="mustRemark">*</span>贸易国(地区)</span>
                            </th>
                            <td style="">
                                <input class="textbox-text validatebox-text textbox-prompt"
                                       type="text" placeholder=""
                                       autocomplete="off"
                                       style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                       value="${declaration.trading_country}"/>
                                </span>
                                <input id="tradeAreaCode" atitle="" style="display: none;"
                                       name="baHgbaseinfo.tradeAreaCode" selectData="hg_co_gjdm"
                                       theKey="SHOWNAME" style="diplay:none;" theValue="ID"
                                       value="${declaration.trading_country}"
                                       valueId="tradeAreaCodeHidden"/>
                                <input type="hidden" id="tradeAreaCodeHidden"
                                       name="tradeAreaCodeHidden" class="{required:true}"
                                       value=""/>
                            </td>
                            <th>
                                    <span><span class="mustRemark">*</span>
                                        <c:if test="${table=='export'}">
                                            指运港
                                        </c:if>
                                        <c:if test="${table=='entry'}">
                                            装货港
                                        </c:if>
                                    </span>
                            </th>
                            <td style="width: 15%;">
                                <input class="textbox-text validatebox-text textbox-prompt"
                                       type="text" placeholder=""
                                       autocomplete="off"
                                       style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                       value="${declaration.arrived_port}"/>
                                </span>
                                <input id="HGSB-ZYG" atitle="海关申报-指运港" valueId="zygHidden"
                                       selectData="hg_co_gkdm" name="baHgbaseinfo.zyg"
                                       theKey="SHOWNAME" theValue="ID"
                                       value="${declaration.arrived_port}"
                                       style="display: none;"/>
                                <input type="hidden" id="zygHidden" name="zygHidden"
                                       class="{required:true}" value=""/>
                            </td>

                            <th style="width: 10%;">
                                <span><span class="mustRemark">*</span>
                                <c:if test="${table=='entry'}">
                                    境内目的地
                                </c:if>
                                <c:if test="${table=='export'}">
                                    境内货源地
                                </c:if>
                                </span>
                            </th>
                            <td style="" colspan="1">
                                <input class="textbox-text validatebox-text textbox-prompt"
                                       type="text" placeholder=""
                                       autocomplete="off"
                                       style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                       value="${declaration.goods_addr}"/>
                                </span>
                                <input valueId="jnhydHidden" id="HGSB-JNHYD" atitle="海关申报-境内货源地"
                                       name="baHgbaseinfo.jnhyd" selectData="co_hgjnmdd"
                                       theKey="SHOWNAME" theValue="ID"
                                       value="" style="display: none;"/>
                                <input type="hidden" id="jnhydHidden" name="jnhydHidden"
                                       class="{required:true}"
                                       value=""/>
                            </td>
                            </tr>
                            <tr>
                                <th>
                                    <span><span class="mustRemark">*</span>件数</span>
                                </th>
                                <td style="width: 15%;">
                                    <input type="text" class="{required:true}"
                                           name="baHgbaseinfo.js"
                                           onblur="numbercheck(this,0,999999999,'',0)"
                                           value="${declaration.goods_count}"
                                           atitle="海关申报-件数"/>
                                </td>
                                <th>
                                    <span><span class="mustRemark">*</span>包装种类</span>
                                </th>
                                <td style="width: 15%;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.goods_package}"/>
                                    </span>
                                    <input id="HGSB-BZZL" atitle="海关申报-包装种类" valueId="bzzlHidden"
                                           name="baHgbaseinfo.bzzl" selectData="co_hgbzzl"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.goods_package}"
                                           style="display: none;"/>
                                    <input type="hidden" id="bzzlHidden" name="bzzlHidden"
                                           class="{required:true}" value=""/>
                                </td>
                                <th style="width: 3%;">
                                    <span>运费</span>
                                </th>
                                <td>
                                    <input value="${declaration.freight2}"/>
                                </td>
                                <td style="width: 10%;">
                                    <input name="baHgbaseinfo.yfl"
                                           onblur="numbercheck(this,0,999999999999,'',7)"
                                           value="${declaration.freight2}"
                                           style="width: 100%" type="text"
                                           atitle="海关申报-运费/率"/>
                                </td>
                                <td id="YFBZ_TD" style="width: 5%;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value=""
                                    />
                                    </span>
                                    <input id="HGSB-YFBZ" atitle="海关申报-运费币制"
                                           name="baHgbaseinfo.yfbz" selectData="hg_co_bz"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.freight3}"
                                           style="display: none;"/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <span><span class="mustRemark">*</span>毛重(KG)</span>
                                </th>
                                <td style="width: 15%;">
                                    <input type="text" class="{required:true}" id="mz"
                                           onblur="numbercheck(this,0,99999999999999,'',5);adjustGrossAndNet();"
                                           value="${declaration.gross_weight}"
                                           name="baHgbaseinfo.mz" atitle="海关申报-毛重(KG)"/>
                                </td>
                                <th style="white-space: nowrap;">
                                    <span><span class="mustRemark">*</span>净重(KG)</span>
                                </th>
                                <td style="width: 15%;">
                                    <input type="text" class="{required:true}" id="jz"
                                           onblur="numbercheck(this,0,99999999999999,'',5);adjustGrossAndNet();"
                                           value="${declaration.net_weight}" name="baHgbaseinfo.jz"
                                           atitle="海关申报-净重(KG)"/>
                                </td>
                                <th style="width: 3%;">
                                    <span>保费</span>
                                </th>
                                <td>
                                    ${declaration.premium2}
                                </td>
                                <td style="width: 10%;">
                                    <input type="text"
                                           onblur="numbercheck(this,0,999999999999,'',7)"
                                           style="width: 100%" value="" name="baHgbaseinfo.bfl"
                                           atitle="海关申报-保费/率"/>
                                </td>
                                <td style="width: 5%;">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value=""/>
                                    </span>
                                    <input id="HGSB-BFBZ" atitle="海关申报-保费币制"
                                           name="baHgbaseinfo.bfbz" selectData="hg_co_bz"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.premium3}"
                                           style="width: 100%; display: none;"/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <span><span class="mustRemark">*</span>报关单类型</span>
                                </th>
                                <td>
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.customs_type}"/>
                                    </span>
                                    <input id="HGSB-BGDLX" atitle="海关申报-报关单类型" valueId="bgdlxHidden"
                                           name="baHgbaseinfo.bgdlx" selectData="co_bgdlx"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="5" style="display: none;"/>
                                    <input type="hidden" id="bgdlxHidden" name="bgdlxHidden"
                                           class="{required:true}"
                                           value="5"/>
                                </td>
                                <th>
                                    <span><span class="mustRemark">*</span>成交方式</span>
                                </th>
                                <td>
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.deal_mode}"/>
                                    </span>
                                    <input valueId="cjfsHidden" id="HGSB-CJFS" atitle="海关申报-成交方式"
                                           name="baHgbaseinfo.cjfs" selectData="co_hgcjfs"
                                           theKey="SHOWNAME" theValue="ID"
                                           value="${declaration.deal_mode}" style="display: none;"/>
                                    <input type="hidden" id="cjfsHidden" name="cjfsHidden"
                                           class="{required:true}"
                                           value="${declaration.deal_mode}"/>
                                </td>
                                <th style="width: 3%;">
                                    <span>杂费</span>
                                </th>
                                <td>${declaration.otherfee2}</td>
                                <td style="width: 10%;">
                                    <input type="text"
                                           onblur="numbercheck(this,0,999999999999,'',7)"
                                           style="width: 100%" value="${declaration.otherfee2}"
                                           name="baHgbaseinfo.zfl"
                                           atitle="海关申报-杂费/率"/>
                                </td>
                                <input class="textbox-text validatebox-text textbox-prompt"
                                       type="text" placeholder=""
                                       autocomplete="off"
                                       style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                       value="${declaration.otherfee2}"/>
                                </span>
                                <input id="HGSB-ZFBZ" atitle="海关申报-杂费币制"
                                       name="baHgbaseinfo.zfbz" selectData="hg_co_bz"
                                       theKey="SHOWNAME" theValue="ID"
                                       value="${declaration.otherfee3}"
                                       style="width: 100%; display: none;"/>
                                </td>
                            </tr>
                            <tr>
                                <th style="display: none;">
                                    <span>批准文号</span>
                                </th>
                                <td colspan="3" style="display: none;">
                                    <input type="hidden" name="baHgbaseinfo.pzwh" atitle="海关申报-批准文号"
                                           value="${declaration.approval_no}"
                                           class="{anLength:[0,30]}"/>
                                </td>
                                <th>
                                    <span> 备注</span>
                                </th>
                                <c:if test="${table=='entry'}">
                                <td colspan="3">
                                    </c:if>
                                    <c:if test="${table=='export'}">
                                <td colspan="7">
                                    </c:if>
                                    <input type="text" name="baHgbaseinfo.bz"
                                           value="${declaration.contract_remark}"
                                           atitle="海关申报-备注" class="{maxlength_T:255}"/>
                                </td>
                                <c:if test="${table=='entry'}">
                                    <th>
                                        <span> 批准文号</span>
                                    </th>
                                    <td colspan="3">
                                        <input type="text" name="baHgbaseinfo.pzqh"
                                               value="${declaration.approval_no}"
                                               atitle="海关申报-批准文号" class="{maxlength_T:255}"/>
                                    </td>
                                </c:if>
                            </tr>
                        </table>

                        <div class="dashedbar text-red">
                            <span>商品信息</span>
                        </div>
                        <div id="view"></div>
                        <script id="demo" type="text/html">
                            <table id="hggoods_input_table" style="width: 99%"
                                   class="pn-ftable table-bordered table-condensed table">
                                <tr>
                                    <th>
                                        <span><span class="mustRemark">*</span>商品序号</span>
                                    </th>
                                    <td>
                                        <input type="hidden" showIndex="0" fieldName="id"
                                               id="hggoods_id"/>
                                        <input id="goodshow_serid" type="text"
                                               value="{{d.index_num}}"
                                               showIndex="1"
                                               fieldName="" fieldName="" readonly="readonly"
                                               notClear="notClear"/>

                                        <input value="1" type="hidden" id="hggoods_spxh"
                                               readonly="readonly" style="" atitle="海关商品-商品序号"
                                               showIndex="0" fieldName=""/>
                                        <input type="hidden" value="" id="hggoods_hwxh"
                                               readonly="readonly" style="" atitle="海关商品-商品序号"
                                               showIndex="0" fieldName="spxh"/>
                                    </td>
                                    <th>
                                        <span>合同商品项目序号</span>
                                    </th>
                                    <td colspan="2">
                                        <input type="text" id="hggoods_htspxmxh" style="width: 100%"
                                               atitle="海关商品-合同商品项目序号" showIndex="2"
                                               fieldName="htspxmxh" value=""
                                               onblur="numbercheck(this,0,999999999,'',0)"
                                               maxlength="9"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>商品编号</span>
                                    </th>
                                    <td colspan="4">
                                        <input class="textbox-text validatebox-text textbox-prompt"
                                               type="text" placeholder=""
                                               autocomplete="off"
                                               style="padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                               id="hggoodsSelect_spbh_show"
                                               value="{{d.code_t}}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <span><span class="mustRemark">*</span>商品名称</span>
                                    </th>
                                    <td colspan="4">
                                        <input type="text" id="hggoods_spmc" showIndex="4"
                                               fieldName="spmc" class="hgGoodRequired"
                                               value="{{d.name}}"
                                               atitle="海关商品-商品名称" maxlength="255"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>规格型号</span>
                                    </th>
                                    <td colspan="4">
                                        <input type="text" value="{{d.goods_mode}}"
                                               id="hggoods_spggxh" style=""
                                               atitle="海关商品-规格型号" class="hgGoodRequired"
                                               showIndex="0"
                                               fieldName="spggxh" maxlength="255"
                                               onchange="changeUpper(this)"/>
                                        <input type="hidden" id="hggoods_otherTds" showIndex="99"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <span><span class="mustRemark">*</span>计价单位</span>
                                    </th>
                                    <td>
                                        <input type="text" id="valuation_unit"
                                               class="hgGoodRequired" value="{{d.unit}}"
                                               atitle="海关商品-计价单位" maxlength="255" showIndex="3"
                                               fieldName="spmc"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>计价数量</span>
                                    </th>
                                    <td>
                                        <input type="text" id="valuation_quantity"
                                               class="hgGoodRequired" value="{{d.goods_number}}"
                                               atitle="海关商品-计价数量" maxlength="250" showIndex="3"
                                               fieldName=""/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>法定单位</span>
                                    </th>
                                    <td>
                                        <input type="text" id="legal_unit" class="hgGoodRequired"
                                               value="{{d.legal_unit}}" atitle="海关商品-法定单位"
                                               maxlength="255" showIndex="3"
                                               fieldName=""/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>法定数量</span>
                                    </th>
                                    <td>
                                        <input type="text" id="Labor"
                                               class="hgGoodRequired" value="{{d.legal_count}}"
                                               atitle="海关商品-法定数量" maxlength="255" showIndex="3"
                                               fieldName=""/>
                                    </td>
                                    <th>
                                        <span>工激费</span>
                                    </th>
                                    <td>
                                        <input type="text" id="legal_quantity"
                                               class="hgGoodRequired" value="{{d.processing_fee}}"
                                               atitle="海关商品-工激费" maxlength="255" showIndex="3"
                                               fieldName=""/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <span><span class="mustRemark">*</span>申报数量</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_sbsl" style="width: 100%"
                                               value="{{d.count}}" atitle="海关商品-申报数量" showIndex="6"
                                               fieldName="sbsl"
                                               onblur="numbercheck(this,0,99999999999999,'',5);caclulateHgGoodPrice();"
                                               class="hgGoodRequired"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>申报计量单位</span>
                                    </th>
                                    <td>
                                        <input class="textbox-text validatebox-text textbox-prompt"
                                               type="text" placeholder=""
                                               autocomplete="off"
                                               style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                               id="hggoodsSelect_sbjldw_show" value="{{d.unit}}"
                                               onfocus="initByFocus($(this));"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>总价</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_zj" class="hgGoodRequired"
                                               atitle="海关商品-总价" showIndex="0" fieldName="zj"
                                               onblur="numbercheck(this,0,999999999999999,'',2);caclulateHgGoodPrice();"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>单价</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_dj" style="width: 100%"
                                               atitle="海关商品-单价" showIndex="0" fieldName="dj"
                                               onblur="numbercheck(this,0,99999999999,'',4)"
                                               value="{{d.unit_price}}"
                                               class="hgGoodRequired"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>币制</span>
                                    </th>
                                    <td>
                                        <input class="textbox-text validatebox-text textbox-prompt"
                                               type="text" placeholder=""
                                               autocomplete="off"
                                               style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                               id="hggoodsSelect_bz_show" value="{{d.currency}}"
                                               onfocus="initByFocus($(this));"/>
                                    </td>
                                </tr>
                                <tr>

                                    <th>
                                        <span><span class="mustRemark">*</span>第一数量</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_dysl" class="hgGoodRequired"
                                               atitle="海关商品-第一数量" value="{{d.count}}"
                                               onblur="numbercheck(this,0,99999999999999,'',5);"
                                               showIndex="0" fieldName="dysl"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>第一计量单位</span>
                                    </th>
                                    <td>
                                        <input class="textbox-text validatebox-text textbox-prompt"
                                               type="text" placeholder=""
                                               autocomplete="off"
                                               style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                               readOnly="readOnly" value="{{d.unit}}"
                                               id="hggoodsSelect_dyjldw_show"
                                               onfocus="initByFocus($(this));"/>
                                    </td>
                                    <th>
                                    <span><span class="mustRemark">*</span>
                                        <c:if test="${table=='export'}">
                                            目的国
                                        </c:if>
                                        <c:if test="${table=='entry'}">
                                            原产国
                                        </c:if>
                                    </span>
                                    </th>
                                    <td>
                                        <c:if test="${table=='export'}">
                                            <input class="textbox-text validatebox-text textbox-prompt"
                                                   type="text" placeholder=""
                                                   autocomplete="off"
                                                   style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                                   id="hggoodsSelect_ycgmdg_show"
                                                   value="{{d.destination}}"
                                                   onfocus="initByFocus($(this));"/>
                                        </c:if>
                                        <c:if test="${table=='entry'}">
                                            <input class="textbox-text validatebox-text textbox-prompt"
                                                   type="text" placeholder=""
                                                   autocomplete="off"
                                                   style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                                   id="hggoodsSelect_ycgmdg_show"
                                                   value="{{d.origin_country}}"
                                                   onfocus="initByFocus($(this));"/>
                                        </c:if>
                                    </td>
                                    <th style="display: none;">
                                        <span><span class="mustRemark">*</span>用途</span>
                                    </th>
                                    <td style="display: none;">
                                        <input type="hidden" id="hggoods_yt" class="" showIndex="0"
                                               value=""
                                               fieldName="yt"/>
                                        <input type="hidden" id="hggoods_ytName" showIndex="0"
                                               fieldName=""/>
                                    </td>
                                    <th style="" colspan="1">
                                    <span><span class="mustRemark">*</span>
                                        <c:if test="${table=='export'}">
                                            原产国
                                        </c:if>
                                        <c:if test="${table=='entry'}">
                                            目的国(地区)
                                        </c:if>
                                    </span>
                                    </th>
                                    <td style="" colspan="1">
                                        <c:if test="${table=='export'}">
                                            <input class="textbox-text validatebox-text textbox-prompt"
                                                   type="text" placeholder=""
                                                   autocomplete="off"
                                                   style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                                   value="{{d.origin_country}}"
                                                   title="(142)中国(CHINA)"
                                                   id="hggoodsSelect_destinationCountry_show"
                                                   onfocus="initByFocus($(this));"/>
                                        </c:if>
                                        <c:if test="${table=='entry'}">
                                            <input class="textbox-text validatebox-text textbox-prompt"
                                                   type="text" placeholder=""
                                                   autocomplete="off"
                                                   style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                                   value="{{d.destination}}"
                                                   title="(142)中国(CHINA)"
                                                   id="hggoodsSelect_destinationCountry_show"
                                                   onfocus="initByFocus($(this));"/>
                                        </c:if>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>征免</span>
                                    </th>
                                    <td colspan="1">
                                        <input class="textbox-text validatebox-text textbox-prompt"
                                               type="text" placeholder=""
                                               autocomplete="off"
                                               style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                               id="hggoodsSelect_zm_show" value="{{d.levymode}}"
                                               onfocus="initByFocus($(this));"/>
                                    </td>
                                </tr>
                                </tr>
                                <tr>
                                    <th>
                                        <span>第二数量</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_desl" style="width: 100%"
                                               atitle="海关商品-第二数量" showIndex="0" fieldName="desl"
                                               value="{{d.second_count}}"
                                               onblur="numbercheck(this,0,99999999999999,'',5)"/>
                                    </td>
                                    <th>
                                        <span>第二计量单位</span>
                                    </th>
                                    <td>
                                        <input class="textbox-text validatebox-text textbox-prompt"
                                               type="text" placeholder=""
                                               autocomplete="off"
                                               style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                               id="hggoodsSelect_dejldw_show"
                                               value="{{d.second_unit}}"
                                               onfocus="initByFocus($(this));"/>
                                    </td>
                                    <th>
                                        <span>版本号</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_bbh" style="width: 100%"
                                               atitle="海关商品-版本号" class="{nLength:[0,8]}"
                                               maxlength="8" value="{{d.version_no}}"
                                               showIndex="0" fieldName="bbh"/>
                                    </td>
                                    <th>
                                        <span>货号</span>
                                    </th>
                                    <td>
                                        <input type="text" id="hggoods_hh" style="width: 100%"
                                               value="{{d.goods_no}}"
                                               atitle="海关商品-货号"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>包装种类</span>
                                    </th>
                                    <td colspan="1">
                                        <input type="text" atitle="海关商品-包装种类"
                                               value="{{d.package_type}}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <span><span class="mustRemark">*</span>毛重</span>
                                    </th>
                                    <td>
                                        <input type="text" class="{required:true}"
                                               onblur="numbercheck(this,0,99999999999999,'',5);adjustGrossAndNet();"
                                               value="{{d.goods_gross_weight}}"
                                               name="baHgbaseinfo.mz"
                                               atitle="海关申报-毛重(KG)"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>净重</span>
                                    </th>
                                    <td>
                                        <input type="text" class="{required:true}"
                                               onblur="numbercheck(this,0,99999999999999,'',5);adjustGrossAndNet();"
                                               value="{{d.goods_net_weight}}" name="baHgbaseinfo.jz"
                                               atitle="海关申报-净重(KG)"/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>箱唛</span>
                                    </th>
                                    <td>
                                        <input type="text" class="hgGoodRequired"
                                               atitle="海关商品-箱唛" maxlength="255" showIndex="3"
                                               fieldName="" value="{{d.carton}}"/>
                                    </td>
                                    <th>
                                        <span>装箱单备注内容</span>
                                    </th>
                                    <td>
                                        <input type="text" class="hgGoodRequired"
                                               atitle="海关商品-装箱单备注内容" maxlength="255" showIndex="3"
                                               value="" fieldName=""/>
                                    </td>
                                    <th>
                                        <span><span class="mustRemark">*</span>包装件数</span>
                                    </th>
                                    <td>
                                        <input type="text" class="hgGoodRequired"
                                               atitle="海关商品-包装件数" maxlength="255" showIndex="3"
                                               value="{{d.goods_number}}" fieldName=""/>
                                    </td>
                                </tr>
                            </table>
                        </script>
                        <table id="hgGoodtable" style="width: 99%;margin-top:20px;"
                               class="table_attach">
                            <tr style="background-color: #53a4ea">
                                <th style="width: 5%;">序号</th>
                                <th style="width: 5%;">合同商品项目序号</th>
                                <th style="width: 18%;">商品编号</th>
                                <th>商品名称</th>
                                <th style="width: 8%;">申报数量</th>
                                <th style="width: 12%;">申报计量单位</th>
                                <th style="width: 5%;">其他</th>
                            </tr>
                            <c:forEach items="${declaration.commodities}" var="commodity">
                                <tr onclick="getData('${commodity.id}')" class="commodityrow"
                                    height="22px;">
                                    <td>${commodity.index_num}</td>
                                    <td>
                                            <%--${commodity.contract_number}--%>
                                    </td>
                                    <td>${commodity.code_t}</td>
                                    <td>${commodity.name}</td>
                                    <td>${commodity.count}</td>
                                    <td>${commodity.unit}</td>
                                    <td>${commodity.package_type}</td>
                                    <td class="goods_gross_weight"
                                        style="display: none;">${commodity.goods_gross_weight}</td>
                                    <td class="goods_net_weight"
                                        style="display: none;">${commodity.goods_net_weight}</td>
                                    <td class="total_price"
                                        style="display: none;">${commodity.total_price}</td>
                                    <td class="goods_number"
                                        style="display: none;">${commodity.goods_number}</td>
                                </tr>
                            </c:forEach>

                            <tr height="22px;">
                                <td colspan="8">
                                    <span style="margin:30px;">件数总汇:&nbsp;<font
                                            id="numberCount"></font> 件</span>
                                    <span style="margin:30px;"> 毛重总汇: &nbsp;<font
                                            id="grossCount"></font> 千克</span>
                                    <span style="margin:30px;"> 净重总汇: &nbsp;<font
                                            id="netCount"></font> 千克</span>
                                    <span style="margin:30px;"> 总价总汇: &nbsp;<font
                                            id="priceCount"></font> 币制</span>
                                </td>
                            </tr>
                        </table>

                        <script>
                            reSetShowSerid();
                            //点击商品查询商品详细信息
                            function getData(id) {
                                $.ajax({
                                           url: "/order/detail?id=" + id,
                                           type: "POST",
                                           success: function (data) {
                                               resetDataToView(data);
                                               $("input").attr("readonly", "readonly");
                                               $("input").css("background-color", "white");
                                           }
                                       });
                            }
                            resetDataToView({});
                            function resetDataToView(data) {
                                var gettpl = document.getElementById(
                                        'demo').innerHTML;
                                laytpl(gettpl).render(data, function (html) {
                                    html = html.replace(/undefined/g, "");
                                    document.getElementById('view').innerHTML = html;
                                });
                            }
                            //                            $(".commodityrow").eq(0).click();
                            var numberCount = 0; //件数总汇
                            $(".goods_gross_weight").each(function () {
                                console.log($(this).html());
                                numberCount += parseInt($(this).html());
                            });
                            $("#numberCount").html(numberCount);

                            var grossCount = 0; //毛重总汇
                            $(".goods_gross_weight").each(function () {
                                console.log($(this).html());
                                grossCount += parseInt($(this).html());
                            });
                            $("#grossCount").html(grossCount);

                            var netCount = 0;//净重总汇
                            $(".goods_net_weight").each(function () {
                                console.log($(this).html());
                                netCount += parseInt($(this).html());
                            });
                            $("#netCount").html(netCount);
                            var priceCount = 0;//净重总汇
                            $(".total_price").each(function () {
                                console.log($(this).html());
                                priceCount += parseInt($(this).html());
                            });
                            $("#priceCount").html(priceCount);
                        </script>
                    </div>
                    <%--END左边区域--%>

                    <%--右边区域--%>
                    <div class="nr-right">
                        <div class="dashedbar text-cyan">
                            <span>集装箱信息</span>
                        </div>
                        <div style="width:330px;float:left">
                            <script type="text/javascript">
                                ajaxFileUpload_BoxType = '1';
                            </script>
                        </div>
                        <ul class="add_but" style="float:right;">
                            <li style="width:100px;">
                                <span style="float:right">集装箱总数：<span id="boxCount">0</span></span>
                            </li>
                        </ul>
                        <div id="JZX-Content">
                            <table id="JZX-table"
                                   width="100%" cellspacing="0" cellpadding="0" border="1"
                                   class="table_attach">
                                <tr class="cyan">
                                    <th>集装箱号</th>
                                    <th>集装箱规格</th>
                                    <th style="width:15%;">自重</th>
                                </tr>
                                <tr id="box_lastTR" height="22px;">
                                    <td>${declaration.container_no}</td>
                                    <td>${declaration.container_no}</td>
                                    <td>${declaration.net_weight}</td>
                                </tr>
                            </table>
                        </div>
                        <script src='<s:url value="/cargodecl/js/exportDeclare_customs/exportDeclareAdd.js"/>'
                                type='text/javascript'></script>
                        <div class="dashedbar text-soft">
                            <span>随附单证信息</span>
                        </div>
                        <div id="SFDZ-Content">
                            <table width="100%" cellspacing="0" cellpadding="0" border="1"
                                   class="table_attach">
                                <tr class="soft">
                                    <th>随附单证代码</th>
                                    <th>单证编号</th>
                                </tr>
                                <tr id="atta_lastTR" height="22px;">
                                    <td>${commodity.license_no}</td>
                                    <td>${commodity.suifudan}</td>
                                </tr>
                            </table>
                        </div>
                        <div class="dashedbar text-red"></div>
                        <table class="pn-ftable table-bordered table-condensed table">
                            <tr>
                                <th style="width: 84px"><span>关联报关单号</span></th>
                                <td colspan="2"><input type="text" name="baHgbaseinfo.glbgdh"
                                                       style="width: 90%" title="海关申报-关联报关单号"
                                                       class="{anLength:[18,18]}"
                                                       value="${declaration.sno}"/></td>
                            </tr>
                            <tr>
                                <th><span>关联备案号</span></th>
                                <td colspan="2"><input type="text" name="baHgbaseinfo.glbah"
                                                       style="width: 90%" title="海关申报-关联备案号"
                                                       class="{anLength:[12,12]}"
                                                       value="${declaration.record_id}"/></td>
                            </tr>
                            <tr>
                                <th><span>保税/监管场所</span></th>
                                <td colspan="2"><input type="text" name="baHgbaseinfo.jgch"
                                                       style="width: 90%" title="海关申报-监管仓号"
                                                       class="{anLength:[0,32]}"
                                                       value="${declaration.trade_mode}"/></td>
                            </tr>
                            <tr>
                                <th><span>货场代码</span></th>
                                <td colspan="2">
                                    <input class="textbox-text validatebox-text textbox-prompt"
                                           type="text" placeholder=""
                                           autocomplete="off"
                                           style=" padding-top: 3px; padding-bottom: 3px; margin-right: 18px; margin-left: 0px;color:black;"
                                           value="${declaration.re_yard_id}"
                                           title=""
                                           onfocus="initByFocus($(this));"/>
                                    </span> <input id="HGSB-HCDM" title="海关申报-货场代码"
                                                   name="baHgbaseinfo.hcdm"
                                                   width="90%" style="display: none;"
                                                   selectData="co_hghcdm"
                                                   theKey="SHOWNAME" theValue="ID" value=""/></td>
                            </tr>
                            <tr>
                                <th><span>转关提前报关</span></th>
                                <td colspan="2">
                                    <input value="正常报关"/>
                                    <%--<select name="baHgbaseinfo.zgtqbg">--%>
                                    <%--<option value="">&nbsp;</option>--%>
                                    <%--<option value="001">正常报关</option>--%>
                                    <%--<option value="003">转关提前报关--%>
                                    <%--</option>--%>
                                    <%--</select>--%>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <div class="dashedbar text-red">
                                        <span>其他事项确认</span>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <th><span class="mustRemark">*</span>特殊关系确认</th>
                                <td colspan="2">
                                    <input value="${declaration.special_relationship_confirm}"/>
                                </td>
                            </tr>
                            <tr>
                                <th><span class="mustRemark">*</span>价格影响确认</th>
                                <td colspan="2">
                                    <input value="${declaration.price_impact_confirm}"/>
                                </td>
                            </tr>
                            <tr>
                                <th><span class="mustRemark">*</span>支付特许权使用费确认</th>
                                <td colspan="2">
                                    <input value="${declaration.payment_royaltils_confirm}"/>
                                </td>
                            </tr>
                            <tr style="display:none;">
                                <th><span>报关人员</span></th>
                                <td colspan="2"><input type="text" name="baHgbaseinfo.bgydm"
                                                       value="" class="{maxlength:8}"
                                                       style="width: 90%" title="海关申报-报关员"/></td>
                            </tr>
                            <tr style="display:none;">
                                <th><span>联系方式</span></th>
                                <td colspan="2"><input type="text" name="baHgbaseinfo.lxfs"
                                                       style="width: 90%" title="海关申报-联系方式"
                                                       class="{maxlength:32}"
                                                       value=""/></td>
                            </tr>
                        </table>
                        <style type="text/css">
                            .radios {
                                margin-left: 160px;
                                margin-top: 20px;
                            }

                            .radio1 {
                                width: 15px;
                                height: 15px;
                            }
                        </style>
                        <div style="margin-left:160px;margin-top:20px;">
                            <input type="radio" style="width:15px;height:15px;float: left;"
                                   name="is_wood_packaging"
                                   <c:if test="${declaration.is_wood_packaging=='有'}">checked="checked"</c:if>   >
                            &nbsp;无木质包装声明 &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" style="width:15px;height:15px;"
                                   name="is_wood_packaging"
                                   <c:if test="${declaration.is_wood_packaging=='无'}">checked="checked"</c:if>  >
                            &nbsp;木质包装声明+合格证
                        </div>


                    </div>
                    <%--END右边区域--%>

                </div>
                <%--END内容区域--%>
            </div>
        </div>
    </form>


</div>
</div>
<!--  ##############出口报关数据录入页面END###############  -->
</body>
</html>
<script src='<s:url value="/cargodecl/js/exportDeclare_customs/exportDeclareSub.js"/>'
        type='text/javascript'></script>
<script type="text/javascript">
    $("input").attr("readonly", "readonly");
    $("input").css("background-color", "white");
</script>
